package com.xqls.dal.dao.mybatis;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.xqls.dal.dao.DischargeRealdataDao;
import com.xqls.dal.model.DischargeRealdata;
import com.xqls.dal.service.DischargeRealdataMapper;

@Repository
public class DischargeRealdataDaoImpl implements DischargeRealdataDao{

	
	@Autowired private DischargeRealdataMapper mapper;
	@Override
	public int insertDischargeRealdata(DischargeRealdata dischargeRealdata) {
		return mapper.insert(dischargeRealdata);
	}
	
	public int updateDischargeRealdata(DischargeRealdata dischargeRealdata){
		return mapper.updateByPrimaryKeySelective(dischargeRealdata);
	}
	
	public DischargeRealdata queryByRealdataNo(Integer realdataNo){
		return mapper.selectByPrimaryKey(realdataNo);
	}
	@Override
	public List<Map<String, Object>> selectByMap(Map<String, Object> map) {
		return mapper.selectByMap(map);
	}
	
	public DischargeRealdata selectByDeviceNo(String deviceNo){
		return mapper.selectBydeviceNo(deviceNo);
	}
	
	public List<Map<String, Object>>  queryAll(){
		return mapper.selectAll();
	}

	@Override
	public List<DischargeRealdata> selectListByMap(Map<String, Object> map) {
		return mapper.selectListByMap(map);
	}

	@Override
	public List<DischargeRealdata> selectDischarge() {
		return mapper.selectDischarge();
	}


}
